from django.contrib import admin

from myApp.models import User


# Register your models here.
class UserAdmin(admin.ModelAdmin):
    # 设置用户显示
    list_display = ['nickname', 'username']
    # 设置每页记录数，默认100
    list_per_page = 10
    # 设置排序
    # ordering = ['date_joined']
    # # 设置默认可编辑字段
    # # list_editable = ['date_joined']
    # # 过滤查询
    # list_filter = ['username', 'first_name', 'phone']
    # # 搜索查询
    # search_fields = ['username', 'first_name', 'phone']
    # # 日期等级划分
    # date_hierarchy = 'date_joined'


admin.site.register(User, UserAdmin)


# Register your models here.
